package com.qxsx.midi.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class MyOpenHelper extends SQLiteOpenHelper {
    public static final String TABLE_NAME = "movie";
    public static final String DB_NAME = "movie.db";
    public static final String COLUMN_ID = "_id";
    public static final String COLUMN_MOVIE_TITLE = "movieTitle";
    public static final String COLUMN_MOVIE_PATH = "moviePath";
    public static final String COLUMN_MOVIE_SIZE = "movieSize";
    public static final String COLUMN_MOVIE_LASTMODIFIED = "movieTime";
    public static final String COLUMN_MOVIE_IMAGE = "movieImage";
    public static final String COLUMN_MOVIE_THUMBNAIL = "movieThumbnail";


    public static final String CREATE_TABLE_MOVIE = "CREATE TABLE " + TABLE_NAME
            + "(" + COLUMN_ID + " integer primary key autoincrement,"
            + COLUMN_MOVIE_TITLE + " text,"
            + COLUMN_MOVIE_SIZE + " text,"
            + COLUMN_MOVIE_LASTMODIFIED + " text,"
            + COLUMN_MOVIE_PATH + " text,"
            + COLUMN_MOVIE_IMAGE + " blob,"
            + COLUMN_MOVIE_THUMBNAIL + " integer)";

    public MyOpenHelper(Context context) {
        super(context, DB_NAME, null, 1);
    }

    public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE_TABLE_MOVIE);
    }

    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }

}
